package com.tfswue.dyq.controller;

import com.tfswue.dyq.config.ResourceNotFoundException;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.awt.*;

@RestController
public class ConsultController {
    @GetMapping(value = "/student/findById", produces = MediaType.APPLICATION_JSON_VALUE)
    public String findById(@RequestParam Integer id) {
        String student = null;
        if (student == null) {
            throw new ResourceNotFoundException("Student not found with id: " + id);
        }
        return student;
    }

}
